home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch08
/
08fig08.wrl
< prev
Wrap
Text File
|
1996-09-22
|
2KB
|
85 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright 1997 By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Stationary Sun
Shape {
appearance DEF White Appearance {
material Material { }
}
geometry Sphere { }
},
# Several orbiting planets
DEF Planet1 Transform {
translation 2.0 0.0 0.0
center -2.0 0.0 0.0
children Shape {
appearance USE White
geometry Sphere { radius 0.2 }
}
},
DEF Planet2 Transform {
translation 3.0 0.0 0.0
center -3.0 0.0 0.0
children Shape {
appearance USE White
geometry Sphere { radius 0.3 }
}
},
DEF Planet3 Transform {
translation 4.0 0.0 0.0
center -4.0 0.0 0.0
children Shape {
appearance USE White
geometry Sphere { radius 0.5 }
}
},
# Animation clocks, one per planet
DEF Clock1 TimeSensor {
cycleInterval 2.0
loop TRUE
},
DEF Clock2 TimeSensor {
cycleInterval 3.5
loop TRUE
},
DEF Clock3 TimeSensor {
cycleInterval 5.0
loop TRUE
},
# Animation paths, one per planet
DEF PlanetPath1 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28
]
},
DEF PlanetPath2 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28
]
},
DEF PlanetPath3 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28
]
}
]
}
ROUTE Clock1.fraction_changed TO PlanetPath1.set_fraction
ROUTE Clock2.fraction_changed TO PlanetPath2.set_fraction
ROUTE Clock3.fraction_changed TO PlanetPath3.set_fraction
ROUTE PlanetPath1.value_changed TO Planet1.set_rotation
ROUTE PlanetPath2.value_changed TO Planet2.set_rotation
ROUTE PlanetPath3.value_changed TO Planet3.set_rotation